package com.itheima.sh.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.sh.pojo.Order;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hl
 * @since 2021-01-06
 */
public interface OrderMapper extends BaseMapper<Order> {
    @Select("SELECT id,total_num,pay_type,pay_money,pay_status,source_type,order_status,create_time FROM tb_order WHERE username=#{username}")
    List<Order> findOrderByUserId(@Param("username") String username);
}
